﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="LogViewer"
	x:Name="LogViewer1"
	Title=""
	Width="720" Height="647" Background="{DynamicResource WindowBG}" OpacityMask="{x:Null}" Opacity="1" AllowsTransparency="True" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False" WindowStyle="None" Foreground="#FFFFFFFF" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" WindowStartupLocation="CenterScreen">

	<Window.Resources>
		<LinearGradientBrush x:Key="ToolbarBGBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF969696" Offset="0"/>
			<GradientStop Color="#FFA6A6A6" Offset="1"/>
		</LinearGradientBrush>
		<DataTemplate x:Key="myCellTemplateYear">
			<DockPanel>
				<TextBlock Foreground="White" Background="White" HorizontalAlignment="Center" Text="{Binding Path=ID}"/>
			</DockPanel>
		</DataTemplate>
		<Style x:Key="TabControlClose" TargetType="{x:Type TabControl}">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type TabControl}">
						<Grid KeyboardNavigation.TabNavigation="Local">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
						
							<TabPanel Grid.Row="0" Margin="0,0,26,0" x:Name="HeaderPanel" Background="Transparent" IsItemsHost="True" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" Height="21.96" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" RenderTransformOrigin="0.5,0.5">
								<TabPanel.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleX="1" ScaleY="1"/>
										<SkewTransform AngleX="0" AngleY="0"/>
										<RotateTransform Angle="0"/>
										<TranslateTransform X="0" Y="0"/>
									</TransformGroup>
								</TabPanel.RenderTransform>
							</TabPanel>
						
							<Border Grid.Row="1" x:Name="Border" Background="{DynamicResource ToolbarBGBrush}" BorderBrush="#FFFFCF01" BorderThickness="1" CornerRadius="2" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="2" Margin="0,-4,0,0">
							
								<!-- The implementation switches the content. This control must be named PART_SelectedContentHost -->
								<ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent"/>
							
							</Border>
						</Grid>					
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="False">
								<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
								<Setter Property="BorderBrush" Value="#FFFFCF01" TargetName="Border"/>
							</Trigger>
						</ControlTemplate.Triggers>
				
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Background" Value="#FF535353"/>
			<Setter Property="Foreground" Value="#FFFFFFFF"/>
		</Style>
		<Style x:Key="LVTCStyle" TargetType="{x:Type TabControl}">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type TabControl}">
						<Grid KeyboardNavigation.TabNavigation="Local">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
						
							<TabPanel Grid.Row="0" Margin="0,-4,26,0" x:Name="HeaderPanel" Background="Transparent" IsItemsHost="True" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" Height="25.96" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" RenderTransformOrigin="0.5,0.5">
								<TabPanel.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleX="1" ScaleY="1"/>
										<SkewTransform AngleX="0" AngleY="0"/>
										<RotateTransform Angle="0"/>
										<TranslateTransform X="0" Y="0"/>
									</TransformGroup>
								</TabPanel.RenderTransform>
							</TabPanel>
						
							<Border Grid.Row="1" x:Name="Border" Background="{DynamicResource ToolbarBGBrush}" BorderBrush="#FFFFCF01" BorderThickness="1" CornerRadius="2" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="2" Margin="0,-4,0,0">
							
								<!-- The implementation switches the content. This control must be named PART_SelectedContentHost -->
								<ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent"/>
							
							</Border>
						</Grid>					
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="False">
								<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
								<Setter Property="BorderBrush" Value="#FFFFCF01" TargetName="Border"/>
							</Trigger>
						</ControlTemplate.Triggers>
				
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Background" Value="#FF535353"/>
			<Setter Property="Foreground" Value="#FFFFFFFF"/>
		</Style>
	</Window.Resources>

	<Grid x:Name="LayoutRoot">
		<Border Margin="0,0,0,0" VerticalAlignment="Top" Height="26.25" CornerRadius="5,4,0,0" BorderBrush="#00505050" BorderThickness="1,1,1,0" x:Name="Titlebar" Visibility="Visible">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF969696" Offset="1"/>
					<GradientStop Color="#FFC2C2C2" Offset="0"/>
				</LinearGradientBrush>
			</Border.Background>
			<Label Height="Auto" Content="Log Viewer" x:Name="Tblabel" FontStyle="Italic" d:IsStaticText="True" Width="Auto" HorizontalAlignment="Center"/>
		</Border>
		<Image HorizontalAlignment="Right" Margin="0,6,4,0" VerticalAlignment="Top" Width="14" Height="15" Source="..\Images\close.png" Stretch="Fill" x:Name="CloseButton"/>
		<Image HorizontalAlignment="Right" Margin="0,6,22,0" VerticalAlignment="Top" Width="14" Height="15" Source="..\Images\Maximize.png" Stretch="Fill" x:Name="Max"/>
		<Image HorizontalAlignment="Right" Margin="0,6.5,40,0" VerticalAlignment="Top" Width="14" Height="15" Source="..\Images\Minimize.png" Stretch="Fill" x:Name="Min"/>
		<Image HorizontalAlignment="Left" Margin="4,3,0,0" VerticalAlignment="Top" Width="21" Height="21" Source="..\Images\mChat.ico" Stretch="Fill"/>
		<TabControl IsSynchronizedWithCurrentItem="True" Margin="0,41.25,0,0" x:Name="ChatTabs" Style="{DynamicResource LVTCStyle}" Background="#FFFFF8F8">
			<TabItem Style="{DynamicResource SimpleTabItem}" Header="Log View" x:Name="MainTab" >
				<Grid Width="Auto" Height="Auto">
					<TextBox Margin="214,0,0,0" Text="" TextWrapping="Wrap" x:Name="LogReader"/>
					<TreeView HorizontalAlignment="Left" Margin="-3,0,0,0" Width="217" x:Name="AvailLogs"/>
				</Grid>
			</TabItem>
			<TabItem Style="{DynamicResource SimpleTabItem}" Header="Search View" x:Name="SearchResults" >
				<Grid Width="Auto" Height="Auto">
					<ListView VerticalAlignment="Top" Height="272" IsSynchronizedWithCurrentItem="True" RenderTransformOrigin="0.221,0.333" x:Name="SearchResults1">
						<ListView.View>
							<GridView>
								<GridViewColumn Header="User" DisplayMemberBinding="{Binding Path=User}"  Width="154" CellTemplate="{StaticResource myCellTemplateYear}" />
							    <GridViewColumn Header="Date"  DisplayMemberBinding="{Binding Path=LogDate}" Width="154" CellTemplate="{StaticResource myCellTemplateYear}"/>
							    <GridViewColumn Header="Time"  DisplayMemberBinding="{Binding Path=Time}" Width="154" CellTemplate="{StaticResource myCellTemplateYear}"/>
								<GridViewColumn Header="Channel"  DisplayMemberBinding="{Binding Path=Time}" Width="240" CellTemplate="{StaticResource myCellTemplateYear}"/>
							</GridView>
						</ListView.View>
					</ListView>
					<TextBox Margin="0,272,0,2" Text="" TextWrapping="Wrap" x:Name="ItemViewer"/>
				</Grid>
			</TabItem>
		</TabControl>
		<Border Background="#FFFFFFFF" CornerRadius="4,4,4,4" BorderBrush="{x:Null}" x:Name="border" RenderTransformOrigin="0.5,0.5" Margin="0,30.25,4.153,0" Height="24" VerticalAlignment="Top" HorizontalAlignment="Right" Width="192" d:LayoutOverrides="Height">
			<Border.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="1" ScaleY="1"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</Border.RenderTransform>
			<Border.BitmapEffect>
				<OuterGlowBitmapEffect GlowSize="5"/>
			</Border.BitmapEffect>
			<Border.BitmapEffectInput>
				<BitmapEffectInput/>
			</Border.BitmapEffectInput>
			<TextBox Width="Auto" Height="22" Text="Search" TextWrapping="Wrap" BorderThickness="0,0,0,0" x:Name="SearchTerm" FontStyle="Italic" Margin="3,0,3,0" TextAlignment="Left">
				<TextBox.Foreground>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF000000" Offset="0"/>
						<GradientStop Color="#FFFFFFFF" Offset="1"/>
					</LinearGradientBrush>
				</TextBox.Foreground>
			</TextBox>
		</Border>
	</Grid>
</Window>